Benjamin Otte [Sat, 5 Nov 2011 21:36:16 +0000 (22:36 +0100)]
filechooserentry: Don't use a magic number
... when we have a proper enum value for a column.
Benjamin Otte [Sun, 6 Nov 2011 17:47:28 +0000 (18:47 +0100)]
entry: Move freeze/thaw into begin/end_change
Benjamin Otte [Thu, 3 Nov 2011 21:03:22 +0000 (22:03 +0100)]
entry: Don't try to handle Tab in entry completions
Instead, fall through to the default handler after closing the
completion. This has the advantage of letting the file chooser entry
capture the tab key properly, so one can't accidentally move out of the
entry by pressing tab while the completion is popped up.
I also suspect it fixes bugs with weird tab keys and shift/ctrl
oddities. But who knows...
Daniel Mustieles [Fri, 16 Dec 2011 13:22:49 +0000 (14:22 +0100)]
Updated Spanish translation
Benjamin Otte [Fri, 16 Dec 2011 12:38:06 +0000 (13:38 +0100)]
tests: Relax a refcount comparison check
We now test for real_refcount >= expected_refcount, because various
parts of the code (a11y, selection, cursor, ...) can and do add
references.
Benjamin Otte [Fri, 16 Dec 2011 11:57:06 +0000 (12:57 +0100)]
a11y: Don't emit children-changed when nothing changed
When we have 0 columns, no children ever get added or removed.
Benjamin Otte [Fri, 16 Dec 2011 10:43:16 +0000 (11:43 +0100)]
treeview: Run unref helper for all rows
Don't do shortcuts. Because all rows need to be unreffed.
Introduced in
92929b968bd479e237b8f6dc1686ca953f4d8c5d.
Matthias Clasen [Fri, 16 Dec 2011 04:59:36 +0000 (23:59 -0500)]
Updates
Matthias Clasen [Fri, 16 Dec 2011 04:35:06 +0000 (23:35 -0500)]
Fix more linking fallout
We are using xinput and gmodule API in a few places in libgtk.
https://bugzilla.gnome.org/show_bug.cgi?id=665326
Matthias Clasen [Fri, 16 Dec 2011 04:09:23 +0000 (23:09 -0500)]
Add missing symbols to the docs
Matthias Clasen [Fri, 16 Dec 2011 04:08:07 +0000 (23:08 -0500)]
Doc format fixes
Matthias Clasen [Fri, 16 Dec 2011 04:00:47 +0000 (23:00 -0500)]
Remove some accidental additions
These functions were never actually implemented
Matthias Clasen [Fri, 16 Dec 2011 03:56:45 +0000 (22:56 -0500)]
Cosmetic change
Matthias Clasen [Fri, 16 Dec 2011 03:55:06 +0000 (22:55 -0500)]
Doc typo fix
Matthias Clasen [Fri, 16 Dec 2011 03:54:51 +0000 (22:54 -0500)]
Add new symbols
Matthias Clasen [Fri, 16 Dec 2011 03:52:29 +0000 (22:52 -0500)]
Doc typo fix
Matthias Clasen [Fri, 16 Dec 2011 03:49:16 +0000 (22:49 -0500)]
Cosmetic changes
Benjamin Otte [Fri, 16 Dec 2011 03:49:03 +0000 (04:49 +0100)]
gtk-demo: Fix warnings in changedisplay
Use the brute force fix. I'm not really interested in fixing this
properly.
Benjamin Otte [Fri, 16 Dec 2011 02:35:59 +0000 (03:35 +0100)]
a11y: Remove unused gtk_cell_accessible_set_cell_data()
Benjamin Otte [Fri, 16 Dec 2011 02:34:25 +0000 (03:34 +0100)]
a11y: Make boolean cell render report its states the new way
Benjamin Otte [Fri, 16 Dec 2011 00:02:06 +0000 (01:02 +0100)]
a11y: Refactor treeview code even more
- Split out set_cell_data()
- Use it
- Get rid of update_cell_value() function, it's now just 2 calls
Benjamin Otte [Thu, 15 Dec 2011 23:28:05 +0000 (00:28 +0100)]
a11y: Redo function signature
With the recent changes to gtk_cell_accessible_update_cache(), the
update_cell_value() function now needs less code, too.
Benjamin Otte [Thu, 15 Dec 2011 23:12:15 +0000 (00:12 +0100)]
a11y: Implement GtkContainerCellAccessible.update_cache
Benjamin Otte [Thu, 15 Dec 2011 23:07:46 +0000 (00:07 +0100)]
a11y: Move update_cache to GtkCellAccesible
This way, we can call it for container renderers, too.
Benjamin Otte [Thu, 15 Dec 2011 22:51:57 +0000 (23:51 +0100)]
a11y: Redo cell update function
1) always emit signals
Previously, newly constructed cells would be told to not emit events.
However, we can ensure that nothing is connected to the signals, so
they will not actually emit anything.
2) don't return anything
The return value is unused anyway.
Benjamin Otte [Thu, 15 Dec 2011 22:39:58 +0000 (23:39 +0100)]
a11y: Remove unused function
Benjamin Otte [Thu, 15 Dec 2011 22:20:40 +0000 (23:20 +0100)]
a11y: remove now unused property lists
Benjamin Otte [Thu, 15 Dec 2011 22:13:10 +0000 (23:13 +0100)]
a11y: Don't copy data between renderers
Now that we don't use custom renderers anymore, we don't need to copy
data between them anymore.
Benjamin Otte [Thu, 15 Dec 2011 22:08:16 +0000 (23:08 +0100)]
a11y: Use cell renderer creation funcs unconditionally
Also delete the previous "new" functions and actually set the real cell
renderer here.
Benjamin Otte [Thu, 15 Dec 2011 22:02:54 +0000 (23:02 +0100)]
gtk: Add accessible types for cell renderers
Benjamin Otte [Thu, 15 Dec 2011 18:16:43 +0000 (19:16 +0100)]
a11y: Use the accessible type
Benjamin Otte [Thu, 15 Dec 2011 17:17:06 +0000 (18:17 +0100)]
cellrenderer: Add API to keep the accessible type
It's private for now, because we require a GType that isn't exported in
the API yet.
Benjamin Otte [Thu, 15 Dec 2011 16:21:11 +0000 (17:21 +0100)]
API: cellrenderer: Add a private struct
Benjamin Otte [Thu, 15 Dec 2011 12:23:28 +0000 (13:23 +0100)]
a11y: Add GtkRendererCellAcessible::renderer
Benjamin Otte [Wed, 14 Dec 2011 21:20:38 +0000 (22:20 +0100)]
a11y: Remove unused variable
Benjamin Otte [Wed, 14 Dec 2011 17:14:47 +0000 (18:14 +0100)]
treeview: Send changed signal directly to a11y code
No more signal handler is needed, therefore the code can also get rid of
tracking the treemodel. And we use a faster approach for iterating the
changed cellrenderers: We just iterate all columns instead of over all
cell accessibles, as that number is likely quite a bit smaller.
Benjamin Otte [Wed, 14 Dec 2011 12:49:31 +0000 (13:49 +0100)]
tests: Add test resetting the model
We first set a NULL model and then reset the old model, just to get the
effect of clearing and then resetting.
We reset the cursor and selection afterwards, so the reset doesn't
destroy all the work we did.
Benjamin Otte [Wed, 14 Dec 2011 12:49:03 +0000 (13:49 +0100)]
treeview: Emit cursor-changed signal when new model is set
Benjamin Otte [Mon, 12 Dec 2011 17:10:04 +0000 (18:10 +0100)]
a11y: Improve treeview's add/remove_selection()
Benjamin Otte [Mon, 12 Dec 2011 17:00:19 +0000 (18:00 +0100)]
a11y: Improve get_selected_rows()
Benjamin Otte [Mon, 12 Dec 2011 16:59:36 +0000 (17:59 +0100)]
a11y: Improve table_is_row_selected()
Benjamin Otte [Mon, 12 Dec 2011 15:41:21 +0000 (16:41 +0100)]
treeview: Signal selection changes to the accessible
And another signal gone.
Benjamin Otte [Mon, 12 Dec 2011 15:20:11 +0000 (16:20 +0100)]
a11y: Emit children-changed properly for treeviews
Fixes the patch reverted in
b7e74ef95f1d9cd851fb81a124beca0ca11dad00
properly.
https://bugzilla.gnome.org/show_bug.cgi?id=548782
Benjamin Otte [Mon, 12 Dec 2011 15:03:56 +0000 (16:03 +0100)]
treeview: Remove unnecessary accessible_expanded()
Instead, just call remove_state().
Benjamin Otte [Mon, 12 Dec 2011 15:02:02 +0000 (16:02 +0100)]
treeview: Add add() function to accessible
... and use that to emit the insertion signals.
Benjamin Otte [Mon, 12 Dec 2011 14:30:47 +0000 (15:30 +0100)]
treeview: Set expandable flag from treeview
... instead of trying to update it manually.
Benjamin Otte [Mon, 12 Dec 2011 14:18:54 +0000 (15:18 +0100)]
a11y: Redo cell accessible action handling
Multiple changes:
- actions are now available unconditionally, but only work in the right
state. This mirrors other actions.
- instead of adding actions manually, they invoke the action on the
GtkCellAccessibleParent interface.
Tests have been updated to reflect the changes
Benjamin Otte [Mon, 12 Dec 2011 12:26:15 +0000 (13:26 +0100)]
a11y: Remove "toggle" action from cell renderers
This is identical to "edit" (even though that name is kinda confusing).
Benjamin Otte [Mon, 12 Dec 2011 11:16:31 +0000 (12:16 +0100)]
treeview: Set EXPANDED state directly on a11y elements
Benjamin Otte [Mon, 12 Dec 2011 10:55:28 +0000 (11:55 +0100)]
treeview: Deprecate gtk_tree_view_set_destroy_count_func()
The accessibility code doesn't need it anymore.
Benjamin Otte [Mon, 12 Dec 2011 10:45:08 +0000 (11:45 +0100)]
a11y: Remove destroy_count_func usage
It's not needed anymore.
Benjamin Otte [Mon, 12 Dec 2011 10:30:24 +0000 (11:30 +0100)]
a11y: Emit row-deleted signal when rows get deleted
Instead of in the old callbacks.
Benjamin Otte [Mon, 12 Dec 2011 10:20:33 +0000 (11:20 +0100)]
a11y: Revert
22a47c3dbd7875af10df58feedd81d7b661222b6
The fix is wrong on multiple levels. I'll add a proper fix soon.
https://bugzilla.gnome.org/show_bug.cgi?id=548782
Benjamin Otte [Mon, 12 Dec 2011 09:39:05 +0000 (10:39 +0100)]
treeview: Don't use signals in a11y row expansion
Instead, add a function and call it directly.
Benjamin Otte [Mon, 12 Dec 2011 09:25:27 +0000 (10:25 +0100)]
a11y: Add _gtk_tree_view_accessible_add_state()
... and _gtk_tree_view_accessible_remove_state(). They should be called
by gtktreeview.c to notify about changes of state for a row.
Benjamin Otte [Mon, 12 Dec 2011 09:24:53 +0000 (10:24 +0100)]
a11y: Split out function
I want to use that function when sending notifications. See next
commits.
Benjamin Otte [Mon, 12 Dec 2011 06:17:02 +0000 (07:17 +0100)]
a11y: Readd FOCUSABLE state
The state was lost in commit
08d86fabc4237092bf04a97795498f2c45575085.
Also order the states that are always set alphabetically.
Benjamin Otte [Mon, 12 Dec 2011 06:09:32 +0000 (07:09 +0100)]
a11y: Remove old notify about showing/visible
As cells are always visible and showing, there is no need to do complex
notification mechanisms anymore.
Benjamin Otte [Sun, 11 Dec 2011 05:37:05 +0000 (06:37 +0100)]
a11y: Add _gtk_cell_accessible_state_changed()
It's supposed to replace the old state_set calls.
Benjamin Otte [Sun, 11 Dec 2011 04:02:36 +0000 (05:02 +0100)]
a11y: Split out renderer<->atk state matching
We now keep a state map. This makes adding new states easier, and
doesn't introduce bugs with state change emissions.
Benjamin Otte [Sun, 11 Dec 2011 02:02:12 +0000 (03:02 +0100)]
a11y: Don't duplicate information anymore
We do provide the expandable and expanded information via
GtkCellRendererState now so there is no need to use extra flags.
Benjamin Otte [Sun, 11 Dec 2011 01:57:36 +0000 (02:57 +0100)]
a11y: Set new treeview flags
Benjamin Otte [Sun, 11 Dec 2011 01:52:26 +0000 (02:52 +0100)]
treeview: Set the new flags when rendering the cell
Benjamin Otte [Sat, 10 Dec 2011 20:05:30 +0000 (21:05 +0100)]
cellrenderer: Add EXPANDED and EXPANDABLE states
These make more sense as flags than they do as properties of the cell
renderer.
Benjamin Otte [Fri, 16 Dec 2011 02:12:39 +0000 (03:12 +0100)]
tests: Add a test for latest commit
Benjamin Otte [Thu, 15 Dec 2011 19:32:54 +0000 (20:32 +0100)]
widget: Don't change sensitive state with insensitve parent
This way child.set_sensitive(True) with an insensitive parent doesn't
cause child to become sensitive.
Benjamin Otte [Thu, 15 Dec 2011 18:38:48 +0000 (19:38 +0100)]
fontchooserwidget: Handle dpi < 0
Just use 96.0
Matthias Clasen [Fri, 16 Dec 2011 03:40:01 +0000 (22:40 -0500)]
Add new symbols
Cosimo Cecchi [Thu, 15 Dec 2011 19:01:35 +0000 (20:01 +0100)]
iconhelper: treat the empty string as a NULL icon name
Treat the empty string as if it was a NULL icon name instead of
rendering GTK_STOCK_MISSING_IMAGE.
This used to be the previous behavior of GtkCellRendererPixbuf and
applications might still rely on it.
Cosimo Cecchi [Thu, 15 Dec 2011 18:59:24 +0000 (19:59 +0100)]
cellrendererpix: save the icon size locally instead of in the helper
We need to save the icon size locally for GtkCellRendererPixbuf, since
its properties are set again every time it's drawn (resetting the icon
size on the helper by means of _gtk_icon_helper_clear() each time).
Cosimo Cecchi [Thu, 15 Dec 2011 17:49:16 +0000 (18:49 +0100)]
menuitem: cleanup arrow-spacing fetch code
Refactor get_arrow_size() to return the spacing as well, since basically
we always need both.
Cosimo Cecchi [Thu, 15 Dec 2011 17:42:27 +0000 (18:42 +0100)]
menuitem: share code between HFW and non-HFW height requests
The code is very similar; having two slightly different code paths is
bad and can lead to bugs. Refactor the code to use the same height
request function.
Cosimo Cecchi [Thu, 15 Dec 2011 15:00:32 +0000 (16:00 +0100)]
menuitem: properly respect padding when drawing the separators
Use the padding when calculating the draw coordinates of the separator.
https://bugzilla.gnome.org/show_bug.cgi?id=666242
Cosimo Cecchi [Thu, 15 Dec 2011 14:54:59 +0000 (15:54 +0100)]
menuitem: force odd height if we're not using wide separators
So that the 1px line can receive the same amount of space above and
below.
https://bugzilla.gnome.org/show_bug.cgi?id=666242
Cosimo Cecchi [Thu, 15 Dec 2011 11:33:50 +0000 (12:33 +0100)]
menuitem: don't request twice the padding for separator menu items
Padding was requested twice for separator menu items.
https://bugzilla.gnome.org/show_bug.cgi?id=666242
Florian Müllner [Sat, 3 Dec 2011 00:46:53 +0000 (01:46 +0100)]
demo: Add test for hide-titlebar-when-maximized
Add an additional option to the appwindow demo to test the new
gtk-hide-titlebar-when-maximized setting.
https://bugzilla.gnome.org/show_bug.cgi?id=665616
Florian Müllner [Sat, 3 Dec 2011 00:47:25 +0000 (01:47 +0100)]
window: Add hide-titlebar-when-maximized property
For maximized windows, titlebars cannot be used to reposition or
scale the window, so if an application does not use it to convey
useful information (other than the application name), the screen
space occupied by titlebars could be put to better use.
Add a new window property which requests from the window manager
to hide titlebars when windows are maximized to account for this.
https://bugzilla.gnome.org/show_bug.cgi?id=665616
Cosimo Cecchi [Thu, 15 Dec 2011 11:16:09 +0000 (12:16 +0100)]
scale: remove unused variable
Rui Matos [Wed, 14 Dec 2011 02:29:38 +0000 (02:29 +0000)]
widget: Synthesize crossing only if sensitivity changed while propagating state
Andrea Cimitan [Wed, 14 Dec 2011 16:16:09 +0000 (17:16 +0100)]
Add has-origin property for GtkScale
If the scale has an origin (it will have one by default), GtkRange will
render the two sides before/after the current value with different style
classes, making it possible for themes to use different colors and
properties for the two areas.
This was possible in GTK 2 with style details, but got lost during the
road to 3.0.
https://bugzilla.gnome.org/show_bug.cgi?id=665140
Rob Bradford [Wed, 14 Dec 2011 13:11:18 +0000 (13:11 +0000)]
wayland: Add dummy implementation of the wl_data_device functionality
Setup listener functions for the drag and drop events as well as the selection
events. Then create and save a data structure representing the data offer from
the other client.
Rob Bradford [Tue, 13 Dec 2011 17:39:43 +0000 (17:39 +0000)]
wayland: Add an implementation for GdkAtom
This implementation is based on a hash table. The hard coded GtkSelection
atoms are preloaded into the hash table at the correct values. User generated
atoms start after the last preloaded atom.
Rob Bradford [Mon, 12 Dec 2011 14:26:27 +0000 (14:26 +0000)]
wayland: Get the data device during input device setup
The data device is a associated with the input device - fetch the data device
from the data manager for the current input device.
Rob Bradford [Mon, 12 Dec 2011 13:56:25 +0000 (13:56 +0000)]
wayland: Retrieve the data device manager object
The data device manager is a global object that provides the support
infrastructure around data devices. These data device objects are the basis
for handling drag and drop as well as selections in Wayland.
Rob Bradford [Wed, 14 Dec 2011 14:27:07 +0000 (14:27 +0000)]
wayland: Don't use deprecated function: gdk_window_get_pointer
Replace it with gdk_window_get_device_position.
Pavol Šimo [Wed, 14 Dec 2011 13:19:06 +0000 (14:19 +0100)]
Updated Slovak translation
Jan Rękorajski [Wed, 14 Dec 2011 13:09:48 +0000 (14:09 +0100)]
print dialog: Fix authentication logic
Reset state of CUPS requests correctly during authentization and
check CUPS requests for errors.
Don't initialize variables holding password and username with empty
string (#664640).
Matthias Clasen [Wed, 14 Dec 2011 02:13:31 +0000 (21:13 -0500)]
Fix nicks for the window class enum
As pointed out in bug 665999, these were just not right.
Before this commit, the nicks were 'output' and 'only'.
After this commit, they are 'input-output' and 'input-only'.
Alexander Larsson [Tue, 13 Dec 2011 23:23:57 +0000 (00:23 +0100)]
Fix set_focus_child handling during focus changes
In many cases we used to set focus_child to NULL all the way up
to the top and then to the right value, even if there was
a common ancestor, meaning these see a temporary NULL value for
focus_child. Only when the new focus widgets direct parent was
in the previous ancestor list did we stop early.
This fixes that by always stopping propagation when reaching
the common ancestor.
Claudio Saavedra [Tue, 13 Dec 2011 17:25:15 +0000 (19:25 +0200)]
GtkFrame: Fix a casting in the compute_child_allocation() method
The casting used to calculate the child allocation is confusing MAX().
As a result, width and height end up with negative values, which makes no sense.
https://bugzilla.gnome.org/show_bug.cgi?id=666109
Cosimo Cecchi [Sat, 10 Dec 2011 00:14:12 +0000 (19:14 -0500)]
themingengine: split a GtkThemingBackground object
Allows easier modification and general sanity of the CSS background
rendering code.
Cosimo Cecchi [Mon, 12 Dec 2011 11:30:27 +0000 (12:30 +0100)]
image: take misc padding into account when calculating x/y draw coords
This fixes the misc-alignment.ui reftest.
Cosimo Cecchi [Mon, 12 Dec 2011 11:29:21 +0000 (12:29 +0100)]
image: add gtk_image_get_preferred_size()
Add a function to query the preferred size of the GtkImage, and use it
in the get_preferred_width/height implementations.
Benjamin Otte [Sat, 10 Dec 2011 06:54:34 +0000 (07:54 +0100)]
treeview: Ensure selection's changed signal
There was a corner case where the changed signal was not emitted.
If rows were built like this:
1 (not selected)
+ 2 (selected)
+ 3 (not selected)
And row 1 was removed, no signal would be emitted.
I like it when writing tests actually finds bugs that have been around
since 2003 - introduced by
4a03ea2334bde7d2e15d0933c5a78f5a2338a854
actually. :)
Benjamin Otte [Sat, 10 Dec 2011 05:49:29 +0000 (06:49 +0100)]
treeview: Don't try to optimize away selection_changed signal
We get certain cases, in particular with SELECTION_MULTIPLE, where we
cannot figure out in advance of real_set_cursor() if the selection will
actually change.
Benjamin Otte [Sat, 10 Dec 2011 05:24:40 +0000 (06:24 +0100)]
tests: Add select/unselect calls
Benjamin Otte [Sat, 10 Dec 2011 05:10:05 +0000 (06:10 +0100)]
treeview: Add a CURSOR_INVALID flag to set_cursor_row()
This is necessary so the code doesn't attempt to do things with the
previous cursor, which currently cause crashes.
Benjamin Otte [Sat, 10 Dec 2011 05:06:06 +0000 (06:06 +0100)]
treeview: Replace lots of boolean args with flags
I want to add more and 3 boolean args is essentially unreadable code.
Benjamin Otte [Sat, 10 Dec 2011 04:45:02 +0000 (05:45 +0100)]
tests: Add sanity checks for selection
We want to know that the selection emits "changed" when it changes.
Benjamin Otte [Sat, 10 Dec 2011 04:26:06 +0000 (05:26 +0100)]
docs: Update code demo for newer glib